<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../common.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>监控系统表单</title>
</head>
<body>
<form id="ff" action="${ctx}/monitorSystem/upd" method="post" data-options="novalidate:true">
	<input type="hidden" id="id" name="id" value="${monitorSystem.id}">
	<input type="hidden" id="message" value="${message}">
	
	<div style="margin-bottom:15px">
		<input class="easyui-textbox" name="name" value="${monitorSystem.name}" style="width:95%" data-options="label:'系统名称:',required:true">
	</div>
	<div style="margin-bottom:15px">
		<input class="easyui-textbox" name="describe" value="${monitorSystem.describe}" style="width:95%" data-options="label:'描述:'">
	</div>
	<div style="margin-bottom:15px">
		<input class="easyui-textbox" name="email" value="${monitorSystem.email}" style="width:95%" data-options="label:'报警邮箱地址:',required:true">
	</div>
	<div style="margin-bottom:15px">
		<input class="easyui-textbox" name="dbUrl" value="${monitorSystem.dbUrl}" style="width:95%" data-options="label:'监控数据地址:',required:true">
	</div>
	<div style="margin-bottom:15px">
		<input class="easyui-textbox" name="dbName" value="${monitorSystem.dbName}" style="width:95%" data-options="label:'监控数据库名称:',required:true">
	</div>
	<div style="margin-bottom:15px">
		<input class="easyui-textbox" name="dbUsername" value="${monitorSystem.dbUsername}" style="width:95%" data-options="label:'数据库账号:',required:true">
	</div>
	<div style="margin-bottom:15px">
		<input class="easyui-textbox" name="dbPassword" value="${monitorSystem.dbPassword}" style="width:95%" data-options="label:'数据库密码:',required:true">
	</div>
</form>
<div style="text-align:center;padding:5px 0">
	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()" style="width:80px">Submit</a>
	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()" style="width:80px">Clear</a>
</div>
</body>
<script>
	$(function() { 
		// 消息提醒
		var message = $("#message").val();
		if(message){
			$.messager.alert('提示', message);
			parent.reloadList();
		}
	});
	function submitForm(){
		//数据检查
		if(!$('#ff').form('enableValidation').form('validate')){
			return;
		}
		//提交
		$('#ff').submit();
	}
	function clearForm(){
		$('#ff').form('clear');
	}
</script>
</html>